package com.zjol

/**
  * Created by Administrator on 2017/3/27.
  */
class ApplyTest {

  def  apply()=println("I am into spark")

  def haveATry: Unit ={
    println("Hava a try on apply")
  }

}

object ApplyTest{
  def  apply()={
    println("I am into")
    new ApplyTest
  }
}


object ApplyOperation{
  def main(args: Array[String]): Unit = {

     var array=Array(1,2,3,4)
    val  a=ApplyTest();
    a.haveATry

  }
}